package com.rd.teacher.jichao.day15.producer2_1;

public class Test {

    public static void main(String[] args) {

        Container container = new Container();
        // Producer implements Runnable
//        Producer producer1 = new Producer(container);
//        Thread thread1 = new Thread(producer1);
//        thread1.start();

        new Thread(new Producer(container), "Producer-1").start();
        new Thread(new Producer(container), "Producer-2").start();
//        new Thread(new Producer(container), "Producer-3").start();

//        Consumer consumer1 = new Consumer(container);
//        Thread thread11 = new Thread(consumer1);
//        thread11.start();
        new Thread(new Consumer(container), "Consumer-1").start();
//        new Thread(new Consumer(container), "Consumer-2").start();
//        new Thread(new Consumer(container), "Consumer-3").start();
    }
}
